package com.huika.renrench.ui;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.huika.renrench.R;
import com.huika.renrench.control.common.base.BaseFra;
/**
 * tab页关于
 * @author fanxing 创建于 Mar 30, 2015
 */
public class AboutFragment extends BaseFra {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		View root = inflater.inflate(R.layout.frag_about, container, false);
		//标题栏部分
		TextView tv_title = (TextView) root.findViewById(R.id.title);
		tv_title.setText(R.string.about);
		root.findViewById(R.id.right).setVisibility(View.GONE);
		root.findViewById(R.id.left).setVisibility(View.GONE);
		
		root.findViewById(R.id.rl_phone).setOnClickListener(this);
		root.findViewById(R.id.rl_loc).setOnClickListener(this);
		return root;
	}
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
			case R.id.rl_phone://拨号
				String tell = getString(R.string.about_tell);
				Intent telIntent = new Intent(Intent.ACTION_DIAL);
				telIntent.setData(Uri.parse("tel:" + tell));
				startActivity(telIntent);
				break;
			case R.id.rl_loc://位置
				Intent goalIntent = new Intent(getActivity(), GaodeMapRouteActivity.class);
				startActivity(goalIntent);
				break;
		}
	}

	@Override
	protected View inflaterView(LayoutInflater inflater, ViewGroup container,
			Bundle bundle) {
		// TODO Auto-generated method stub
		return null;
	}
}
